package com.jenkins.test.web;

import com.jenkins.test.response.Result;
import com.jenkins.test.web.vo.TravelDataUtil;
import com.jenkins.test.web.vo.TravelPageVo;
import com.jenkins.test.web.vo.TravelVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName: {@link TravelController}
 * @Description: TestController
 * @author: Lanzhou
 * @date: 2020/11/15 13:49
 * @QQ: 1627518680
 * @Copyright:2020 All rights reserved.
 */
@RestController
@RequestMapping("/travel/")
public class TravelController {

    /**
     * 获取数据
     *
     * @param num
     * @return
     */
    @GetMapping("getPageData")
    public Result<TravelPageVo> getPageData(Integer num) {
        return Result.success(TravelDataUtil.buildTravelData());
    }

    /**
     * 获取数据
     *
     * @return ss
     */
    @GetMapping("testData")
    public Result<List<TravelVo>> testData() {
        TravelPageVo travelPageVo = TravelDataUtil.buildTravelData();
        List<TravelVo> travelVos = travelPageVo.getShanghaiTravelMap().get("http://114.98.238.142:9000/imgcloud/ia_10062.jpg");
        return Result.success(travelVos);
    }


}
